/*  1:   */ package org.intellij.images.options.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.JDOMExternalizer;
import org.jdom.Element;

import java.awt.*;

/*  4:   */
/*  5:   */
/*  6:   */ 
/*  7:   */ final class JDOMExternalizerEx
/*  8:   */ {
/*  9:   */   public static Color readColor(Element paramElement, String paramString, Color paramColor)
/* 10:   */   {
/* 11:30 */     String str = JDOMExternalizer.readString(paramElement, paramString);
/* 12:31 */     if (str != null) {
/* 13:   */       try
/* 14:   */       {
/* 15:33 */         return new Color(Integer.parseInt(str, 16));
/* 16:   */       }
/* 17:   */       catch (NumberFormatException localNumberFormatException) {}
/* 18:   */     }
/* 19:38 */     return paramColor;
/* 20:   */   }
/* 21:   */   
/* 22:   */   public static void write(Element paramElement, String paramString, Color paramColor)
/* 23:   */   {
/* 24:42 */     if (paramColor != null) {
/* 25:43 */       JDOMExternalizer.write(paramElement, paramString, Integer.toString(paramColor.getRGB() & 0xFFFFFF, 16));
/* 26:   */     }
/* 27:   */   }
/* 28:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.options.impl.JDOMExternalizerEx

 * JD-Core Version:    0.7.0.1

 */